<!-- directive:title 代码自动化生产 产品 -->
<!-- directive:breadcrumb 自动化 -->
<div class="panel-body">
    <p>1 从表格进入表单 表单处理完成 返回来的话不携带任何参数</p>
    <p>2 从表格进入表单 进错了 点后退返回 参数恢复且有效</p>
    <p>3 考虑 面包屑点击有回退效果</p>
</div>
<div class="yxt14 panel-body">
    <div class="yxt14breadcrumb">
        <a href="javascript:;">当前位置 : 收入分配</a><a href="javascript:;">二业务</a>
    </div>
    <div class="container-fluid">
        <div class="yxt14main panel">
            <div class="yxt14title"><i></i>  二业务</div>
            <div class="yxt14nav">
                <a class="yxt14navson yxt14active" ng-click="goto('income.busi_brower')">浏览器</a>
                <a class="yxt14navson " ng-click="goto('income.busi_down')">下载器</a>
            </div>
            <form class="form-inline">
                <div class="form-group">
                    <le-date style="width:200px;" bdate="obj.begin" edate="obj.end"
                    ></le-date>
                </div>
                <div class="form-group">
                    <input class="form-control" type="text" name="keyWord"
                        ng-model="obj.keyWord" placeholder="请输入关键字"
                    />
                </div>
                <div class="form-group">
                    <input select2 config="dataSet.customer" ng-model="obj.username"
                        select2-model='dataSet.username' class="form-control" placeholder="全部用户"
                    />
                </div>
                <div class="form-group">
                    <input select2 config="dataSet.busiType" ng-model="obj.bizId"
                        select2-model='dataSet.bizId' class="form-control" placeholder="全部分类"
                    />
                </div>
                <div class="form-group">
                    <input select2 config="dataSet.archiveStatus" ng-model="obj.archive"
                        select2-model='dataSet.archive' class="form-control" placeholder="全部归档状态"
                    />
                </div>
                <div class="form-group">
                    <input select2 config="dataSet.incomeStatus" ng-model="obj.incomeStatus"
                        select2-model='dataSet.incomeStatus' class="form-control" placeholder="全部收入状态"
                    />
                </div>
                <div class="form-group">
                    <input select2 config="dataSet.splitStatus" ng-model="obj.splitState"
                        select2-model='dataSet.splitState' class="form-control" placeholder="全部拆分状态"
                    />
                </div>
                <div class="form-group">
                    <button ng-click="search()" class="btn yxt14btn-red">搜&nbsp;&nbsp;索</button>
                </div>
                <div class="form-group">
                    <button ng-click="reset()" class="btn yxt14btn-gray">重&nbsp;&nbsp;置</button>
                </div>
                <div class="form-group pull-right">
                    <button class="btn yxt14btn-blue" ng-click="synchronizationItem()">
                        <i class="glyphicon glyphicon-plus"></i> 同步数据
                    </button>
                </div>
                <div class="form-group pull-right">
                    <button class="btn yxt14btn-blue" ng-click="exportItem()">
                        <i class="glyphicon glyphicon-plus"></i> 导出
                    </button>
                </div>
                <div class="form-group pull-right">
                    <button class="btn yxt14btn-blue" ng-click="batchEditPriceItem()">
                        <i class="glyphicon glyphicon-plus"></i> 批量处理单价
                    </button>
                </div>
                <div class="form-group pull-right">
                    <button class="btn yxt14btn-blue" ng-click="batchEditNumberItem()">
                        <i class="glyphicon glyphicon-plus"></i> 批量处理数量
                    </button>
                </div>
                <div class="form-group pull-right">
                    <button class="btn yxt14btn-blue" ng-click="correctItem()">
                        <i class="glyphicon glyphicon-plus"></i> 手动校准
                    </button>
                </div>
                <div class="form-group pull-right">
                    <button class="btn yxt14btn-blue" ng-click="autoCorrectItem()">
                        <i class="glyphicon glyphicon-plus"></i> 开启自动校准
                    </button>
                </div>
            <div style="clear:both;"></div>
            </form>
            <div class="table-responsive main-table-striped">
                <table class="table">
                <thead>
                    <tr>
                        <th class="yxt14left" title="产出日期" style="width:100px;">产出日期</th>
                        <th class="yxt14left" title="归档日期" style="width:100px;">归档日期</th>
                        <th class="yxt14left" title="用户名" style="width:100px;">用户名</th>
                        <th class="yxt14left" title="业务名称" style="width:100px;">业务名称</th>
                        <th class="yxt14left" title="推广id" style="width:100px;">推广id</th>
                        <th class="yxt14left" title="链接" style="width:100px;">链接</th>
                        <th class="yxt14left" title="UV数" style="width:100px;">UV数</th>
                        <th class="yxt14left" title="调整后的UV数" style="width:100px;">调整后的UV数</th>
                        <th class="yxt14left" title="收入单价" style="width:100px;">收入单价</th>
                        <th class="yxt14left" title="收入金额" style="width:100px;">收入金额</th>
                        <th class="yxt14left" title="收入总金额" style="width:100px;">收入总金额</th>
                        <th class="yxt14left" title="收入状态" style="width:100px;">收入状态</th>
                        <th class="yxt14left" title="归档状态" style="width:100px;">归档状态</th>
                        <th class="yxt14left" title="拆分状态" style="width:100px;">拆分状态</th>
                        <th class="yxt14center" title="操作" style="width:100px;">操作</th>
                    </tr>
                </thead>
                <tbody ng-show="!yxt14datalist.length && !yxt14loading">
                    <tr>
                        <td colspan="99"><center>无数据</center></td>
                    </tr>
                </tbody>
                <tbody ng-repeat="row in yxt14datalist">
                    <tr>
                        <td class="yxt14left" title="{{ row.date }}">
                            <div class="yxt14ellipsis">
                                {{ row.date }}
                            </div>
                        </td>
                        <td class="yxt14left" title="{{ row.archiveDate }}">
                            <div class="yxt14ellipsis">
                                {{ row.archiveDate }}
                            </div>
                        </td>
                        <td class="yxt14left" title="{{ row.userName }}">
                            <div class="yxt14ellipsis">
                                {{ row.userName }}
                            </div>
                        </td>
                        <td class="yxt14left" title="{{ row.bizName }}">
                            <div class="yxt14ellipsis">
                                {{ row.bizName }}
                            </div>
                        </td>
                        <td class="yxt14left" title="{{ row.adId }}">
                            <div class="yxt14ellipsis">
                                {{ row.adId }}
                            </div>
                        </td>
                        <td class="yxt14left" title="{{ row.url }}">
                            <div class="yxt14ellipsis">
                                {{ row.url }}
                            </div>
                        </td>
                        <td class="yxt14left" title="{{ row.uvCount }}">
                            <div class="yxt14ellipsis">
                                {{ row.uvCount }}
                            </div>
                        </td>
                        <td class="yxt14left" title="{{ row.uvAdjustCount }}">
                            <div class="yxt14ellipsis">
                                {{ row.uvAdjustCount }}
                            </div>
                        </td>
                        <td class="yxt14left" title="{{ row.price }}">
                            <div class="yxt14ellipsis">
                                {{ row.price }}
                            </div>
                        </td>
                        <td class="yxt14left" title="{{ row.amount }}">
                            <div class="yxt14ellipsis">
                                {{ row.amount }}
                            </div>
                        </td>
                        <td class="yxt14left" title="{{ row.xxx }}">
                            <div class="yxt14ellipsis">
                                {{ row.xxx }}
                            </div>
                        </td>
                        <td class="yxt14center" title="{{ row.incomeType }}">
                            <div class="yxt14ellipsis">
                                {{ {'0':'预估','1':'暂定','2':'封账'}[row.incomeType]||'-' }}
                            </div>
                        </td>
                        <td class="yxt14center" title="{{ row.archiveState }}">
                            <div class="yxt14ellipsis">
                                {{ {'0':'未归档','1':'已归档'}[row.archiveState]||'-' }}
                            </div>
                        </td>
                        <td class="yxt14center" title="{{ row.splitState }}">
                            <div class="yxt14ellipsis">
                                {{ {'-1':'失败','1':'成功','0':'初始状态'}[row.splitState]||'-' }}
                            </div>
                        </td>
                        <td class="yxt14center">
                            <a ng-click="adjustmentItem(row)" style="margin-right:10px">调整</a>
                            <a ng-click="eidtItem(row)" style="margin-right:10px">编辑</a>
                            <a ng-click="deleteItem(row)" style="margin-right:10px">删除</a>
                            <a ng-click="openItem(row)" style="margin-right:10px">开启</a>
                        </td>
                    </tr>
                </tbody>
                <tbody class="tablefoot">
                    <tr>
                        <td class="yxt14left"> <b>汇总</b> </td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td class="yxt14left" title="{{ yxt14datasum.uvCountSum }}">
                            <b>{{ yxt14datasum.uvCountSum }}</b>
                        </td>
                        <td class="yxt14left" title="{{ yxt14datasum.uvAdjustCountSum }}">
                            <b>{{ yxt14datasum.uvAdjustCountSum }}</b>
                        </td>
                        <td></td>
                        <td class="yxt14left" title="{{ yxt14datasum.amountSum }}">
                            <b>{{ yxt14datasum.amountSum }}</b>
                        </td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                </tbody>
                <tbody ng-show="yxt14loading">
                    <tr class="yxt14loading">
                        <td colspan="99">
                            <center>数据加载中……</center>
                            <div> <div class="sk-spinner sk-spinner-wave"> <div class="sk-rect1"></div> <div class="sk-rect2"></div>
                            <div class="sk-rect3"></div> <div class="sk-rect4"></div> <div class="sk-rect5"></div> </div> </div>
                        </td>
                    </tr>
                </tbody>
                </table>
            </div>
            <div class="main-table-info">
                <div class="main-table-info-msg"> <h6>{{showMessage()}}</h6> </div>
                <div class="pull-right">
                    <uib-pagination total-items="yxt14totalrow" ng-model="page" max-size="3"
                        first-text="第一页" items-per-page="pagesize" ng-change="pageChanged()"
                        previous-text="上一页" next-text="下一页" last-text="最后页"
                        boundary-links="true" boundary-link-numbers="true">
                    </uib-pagination>
                </div>
            </div>
        </div>

        <script type="text/ng-template" id="batchEditPriceItem.html" >
            <form class="yxf14" name="From">
                <b class="yxf14-title">重新整理的表单</b>
                <div class="yxf14-box">
                    <label class="yxf14-label must">输入框</label>
                    <div class="yxf14-control">
                        <input type="text" placeholder="请输入标题" style="width:200px;"
                            ng-model="frm.a1" name="a1" maxlength="21"
                            required ng-minlength="4" ng-maxlength="20">
                        <b ng-show="( From.a1.$dirty || From.submitted ) && From.a1.$invalid"> {{From.a1.$error.required?"必填项":"请输入4-20字符"}} </b>
                    </div>
                </div>
                <div class="yxf14-box">
                    <label class="yxf14-label must">下拉框</label>
                    <div class="yxf14-control">
                        <input type="text" select2 style="width:200px;" name="a2"
                            ng-model="frm.a2" config="obj2.nameSource" select2-model="frm2.a2" required
                        />
                        <b ng-show="( From.a2.$dirty || From.submitted ) && From.a2.$invalid"> 必填项 </b>
                    </div>
                </div>
                <div class="yxf14-box">
                    <label class="yxf14-label must">领取方式</label>
                    <div class="yxf14-control">
                        <label class="checkbox-inline i-checks"> <input type="radio" ng-model="frm.a3" convert-to-number value="0"> <i></i>线下核销</label>
                        <label class="checkbox-inline i-checks"> <input type="radio" ng-model="frm.a3" convert-to-number value="1"> <i></i>邮寄</label>
                    </div>
                </div>
                <div class="yxf14-box">
                    <label class="yxf14-label must">简介</label>
                    <div class="yxf14-control">
                        <textarea placeholder="请输入简介" style="width:400px;"
                            ng-model="frm.a4" name="a4" rows="3" maxlength="64" required>
                        </textarea>
                        <i ng-hide="( From.a4.$dirty || From.submitted ) && From.a4.$invalid">{{ frm.a4.length || 0 }} / 64</i>
                        <b ng-show="( From.a4.$dirty || From.submitted ) && From.a4.$invalid"> 必填项</b>
                    </div>
                </div>
                <!-- 提交 -->
                <div class="yxf14-box">
                    <div class="yxf14-control">
                        <button type="button" class="btn btn-danger" ng-click="submitFun($event)">提交表单</button>
                    </div>
                </div>
            </form>
        </script>

        <script type="text/ng-template" id="batchEditNumberItem.html" >
            <form class="yxf14" name="From">
                <b class="yxf14-title">重新整理的表单</b>
                <div class="yxf14-box">
                    <label class="yxf14-label must">输入框</label>
                    <div class="yxf14-control">
                        <input type="text" placeholder="请输入标题" style="width:200px;"
                            ng-model="frm.a1" name="a1" maxlength="21"
                            required ng-minlength="4" ng-maxlength="20">
                        <b ng-show="( From.a1.$dirty || From.submitted ) && From.a1.$invalid"> {{From.a1.$error.required?"必填项":"请输入4-20字符"}} </b>
                    </div>
                </div>
                <div class="yxf14-box">
                    <label class="yxf14-label must">下拉框</label>
                    <div class="yxf14-control">
                        <input type="text" select2 style="width:200px;" name="a2"
                            ng-model="frm.a2" config="obj2.nameSource" select2-model="frm2.a2" required
                        />
                        <b ng-show="( From.a2.$dirty || From.submitted ) && From.a2.$invalid"> 必填项 </b>
                    </div>
                </div>
                <div class="yxf14-box">
                    <label class="yxf14-label must">领取方式</label>
                    <div class="yxf14-control">
                        <label class="checkbox-inline i-checks"> <input type="radio" ng-model="frm.a3" convert-to-number value="0"> <i></i>线下核销</label>
                        <label class="checkbox-inline i-checks"> <input type="radio" ng-model="frm.a3" convert-to-number value="1"> <i></i>邮寄</label>
                    </div>
                </div>
                <div class="yxf14-box">
                    <label class="yxf14-label must">简介</label>
                    <div class="yxf14-control">
                        <textarea placeholder="请输入简介" style="width:400px;"
                            ng-model="frm.a4" name="a4" rows="3" maxlength="64" required>
                        </textarea>
                        <i ng-hide="( From.a4.$dirty || From.submitted ) && From.a4.$invalid">{{ frm.a4.length || 0 }} / 64</i>
                        <b ng-show="( From.a4.$dirty || From.submitted ) && From.a4.$invalid"> 必填项</b>
                    </div>
                </div>
                <!-- 提交 -->
                <div class="yxf14-box">
                    <div class="yxf14-control">
                        <button type="button" class="btn btn-danger" ng-click="submitFun($event)">提交表单</button>
                    </div>
                </div>
            </form>
        </script>
    </div>
</div>